<?php

namespace AppBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request;

class BlogController extends Controller
{
    /**
     * Matches /blog exactly
     *
     * @Route("/blog/list", name="blog_list")
     */
    public function listAction()
    {

        echo 1;
        exit;

    }

    /**
     * Matches /blog/*
     *
     * @Route("/blog/show/{slug}", name="blogb_show")
     */
    public function showAction($slug)
    {
        echo $slug;
        exit;
        // $slug will equal the dynamic part of the URL
        // e.g. at /blog/yay-routing, then $slug='yay-routing'

        // ...
    }


     /**
     * @Route("/blog/number/{page}", name="blog_number", requirements={"page": "\d+"})
     */
    public function numberAction($page = 1)
    {
        echo 'blog_number';
        echo "\n";
        echo $page;
        exit;

    }


    /**
     * @Route("/blog/abc/{page}", name="blog_abc", requirements={"page": "\d+"})
     */
    public function abcAction(Request $request ,$page = 1)
    {
        // ...
        echo $page;
        exit;
    }
}
